package com.zc58s.sync;

import java.util.concurrent.locks.ReentrantLock;


/**
 * @author 图灵源码
 * 可重入
 */
public class SyncDemo99 {


    public static void main(String[] args) {
        method1();
    }


    public synchronized static void method1() {
        System.out.println("execute method1");
        method2();
    }

    public synchronized static void method2() {
        System.out.println("execute method2");
        method3();
    }

    public synchronized static void method3() {
        System.out.println("execute method3");
    }
}
